package com.CRApp.service;

import com.CRApp.pojo.Article;
import com.CRApp.pojo.ArticleHistory;
import java.util.List;

public interface ArticleService {
    List<Article> getEssayList();
    List<Article> search(String keyword);

    Article getEssayById(Integer id);

    List<Article> getUserCollections(Integer userId);
    boolean toggleCollection(Integer userId, Integer articleId);
    boolean isCollected(Integer userId, Integer articleId);

    List<ArticleHistory> getUserHistory(Integer userId);

    void clearHistory(Integer userId);

    void addHistory(Integer userId, Integer articleId);
}